package com.geek.base.ch02.work;

import java.util.Scanner;

/*
 *@Date 2025/11/8
 *@Author wangpeng
 *@Description TODO
 */
public class Test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入金字塔的行数：");
        int n = sc.nextInt();

        //i 当前行
        for (int i = 1; i <= n; i++) {
            for(int s = 1; s<= n-i; s++){
                //空格输出
                System.out.print(" ");
            }
            for(int k=1;k<=2*i-1;k++){
                //*输出
                //System.out.print("*");
                char c = (char)('A'+i-1);
                System.out.print(c);
            }
            //换行
            System.out.println();
        }
    }
}
